import { type Dayjs } from "dayjs";

export interface MatchmakerInfoDetail {
  id?: number,
  photoId?: number | null;
  name?: string;
  birthDate?: Dayjs | string | null;
  contactPhone?: string;
  provinceId?: number;
  cityId?: number;
  districtId?: number;
  entryDate?: Dayjs | string | null;
  expertise?: string;
  positionLevel?: string;
  wechatQrcodeId?: number | null;
  location?: string | string[];
  userId?: number;// 用户id
  status?: number;
  gender?: number;
}

// 表单验证规则
export const rulesRef: any = {
  userId: [
    {
      required: true,
      message: '系统用户不能为空！',
    },
  ],
  photoId: [
    {
      required: true,
      message: '照片不能为空！',
      trigger: 'blur',
    },
  ],
  name: [
    {
      required: true,
      message: '姓名不能为空！',
    },
  ],
  birthDate: [
    {
      required: true,
      message: '生日不能为空！',
    },
  ],
  contactPhone: [
    {
      required: true,
      message: '联系方式不能为空！',
    },
    {
      pattern: /^1[3-9]\d{9}$/,
      message: '请输入有效的手机号码！',
      trigger: 'blur',
    },
  ],
  location: [
    {
      required: true,
      message: '区域不能为空！',
    },
  ],
  cityId: [
    {
      required: true,
      message: '城市ID不能为空！',
    },
  ],
  districtId: [
    {
      required: true,
      message: '区域不能为空！',
    },
  ],
  entryDate: [
    {
      required: true,
      message: '入职日期不能为空！',
    },
  ],
  wechatQrcodeId: [
    {
      required: true,
      message: '微信二维码图片不能为空！',
      trigger: 'blur',
    },
  ],
  gender: [
    {
      required: true,
      message: '性别不能为空！',
    },
  ],
};

// 标签映射
export const labelMap = {
  userId: { name: 'userId', label: '系统用户' },
  status: { name: 'status', label: '状态' },
  gender: { name: 'gender', label: '性别' },
  photoId: { name: 'photoId', label: '红娘照片' },
  name: { name: 'name', label: '姓名' },
  birthDate: { name: 'birthDate', label: '生日' },
  contactPhone: { name: 'contactPhone', label: '联系方式' },
  location: { name: 'location', label: '区域' },
  cityId: { name: 'cityId', label: '城市ID' },
  districtId: { name: 'location', label: '地区' },
  entryDate: { name: 'entryDate', label: '入职日期' },
  expertise: { name: 'expertise', label: '擅长领域' },
  positionLevel: { name: 'positionLevel', label: '职级' },
  wechatQrcodeId: { name: 'wechatQrcodeId', label: '微信二维码' },
};

// 状态列表
export const statusList = [
  { label: '审批通过', value: 2 },
  { label: '审批中', value: 1 },
];

// 性别列表
export const genderList = [
  { label: '男', value: 0 },
  { label: '女', value: 1 },
];